A red-eye effect occurs in images due to the ambient lighting conditions being relatively low when a flash is used. A human eye will adapt to the low lighting by dilating the pupil. When the photograph is captured, the light from the flash will enter the dilated pupil, illuminating red blood vessels in the retina. Red-eye detection is an image analysis technique used to localize red-eye effects in digital color photographs captured using a flash.